<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>class</title>
		<script>
		//js中的类
		var obj={
			name:"阳朔",
			age:20,
			marry:false,
			birthday:'1999-1-2',
			phone:"138888788",
			show:function(){
				alert("这个人叫"+this.name+".今年"+this.age+"岁");
			},
			incr:function(a){
				this.age+=a;
			},
			toString:function(){
				return "这个人叫"+this.name+".今年"+this.age+"岁";
			}
		};//类
		alert(obj);
		obj.show();
		obj.name="你拉古斯-杨硕";
		obj.incr(4);
		obj.show();
		alert(obj instanceof Object);
		</script>
	</head>
	<body>
	</body>
</html>
